const joi = require('joi')  // 引入joi模块
const id = joi.number().integer().min(1).required()  // 定义id变量，使用joi验证为整数且最小值为1，必填
const auditorium_id = joi.number().integer().min(1).required()
const movie_id = joi.number().integer().min(1).required()
const show_time = joi.string().required()
const fare = joi.string().required()


exports.add = { body: { auditorium_id, movie_id, show_time, fare } }
exports.put = { body: { auditorium_id, movie_id, show_time, fare, id } }
exports.del = { query: { id } }